package com.jwt.demo.config;

import com.jwt.demo.config.AuthenticationInterceptor;
import com.jwt.demo.config.InterceptorConfig;
import com.jwt.demo.util.UserLoginTokenUtil;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;


@Configuration
@MapperScan(basePackages = "com.jwt.demo.db.mapper")
public class commonConfig{

    /**
     * token 拦截器注册到 spring 容器中
     * @author chenlirun
     * @date 2021/7/14 11:58
     */
//    @Bean
//    public AuthenticationInterceptor authenticationInterceptor(){
//        return new AuthenticationInterceptor();
//    }

    /**
     * 请求路由拦截器
     * @author chenlirun
     * @date 2021/7/15 10:00
     */
    @Bean
    public InterceptorConfig interceptorConfig(){
        return new InterceptorConfig();
    }

}
